package com.shenmazong.controller;

import com.github.pagehelper.PageInfo;
import com.shenmazong.pojo.TbTaskSkillLibrary;
import com.shenmazong.service.TbTaskSkillLibraryService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.ListParamVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/taskSkillLibrary")
public class TaskSkillLibraryController {
    @Autowired
    TbTaskSkillLibraryService tbTaskSkillLibraryService;

    @PostMapping("/findTaskSkillLibraryList")
    public ResultResponse findTaskSkillLibraryList(@RequestBody ListParamVo listParamVo){
        Integer current = listParamVo.getCurrent();
        Integer size = listParamVo.getSize();
        Object taskSkillLibrary = listParamVo.getParamMap().get("taskSkillLibrary");
        PageInfo pageInfo=tbTaskSkillLibraryService.findTaskSkillLibraryList(current,size,taskSkillLibrary);
        return ResultResponse.SUCCESS(pageInfo);
    }
}
